
const splitWordsFn = (words, trigger, fn) => {
    const splitWords = words.split('')
    const lettersDom = document.querySelector(trigger)
    splitWords.forEach((w, index) => {
        const span = document.createElement('span')
        span.innerText = w
        lettersDom.appendChild(span)
        fn && fn(span, index)
    })
}